define([ "PDUtilDir/grid", "PDUtilDir/searchBlock" ],
		function(Grid, SearchBlock) {

			function init(cache, /*addObj, updateObj, delObj, */searchObj) {
				SearchBlock.init('searchBlockId');
				// 初始化
				return Grid({
                    id : "CarTeamGirdDivId",
                    pageSize : 10,
                    index : true,
                    multi : true,
                    pagination : true,
                    cache : false,
                    layout : [ {
                        name : "车队名称",
                        field : "deptName",
                        sort : true
                    }, {
                        name : "代码",
                        field : "deptCode",
                        sort : true
                    }, {
                        name : "电话",
                        field : "phone",
                        width : "10%"
                    }/*, {
                        name : "组织类型",
                        field : "serviceType",
                        format:function(e){
                            return cache.typeMap.get(e.row.serviceType);
                        }
                    }*/, {
                        name : "状态",
                        field : "deleted",
                        format:function(e){
                            if(e.row.deleted==1){
                                return "冻结";
                            }else{
                                return "正常";
                            }
                        }
                    }, {
                        name : "操作",
                        field : "id",
                        width: '100px',
                        format : function(e) {
                            return '<a href="javascript:angular.element(\'#CarTeamGirdDivId\').scope().reserveSupport.run(\'' + e.row.deptUuid + '\')">预定</a>';
                        }
                    } ],
                    toolbar : [
                        {
                            name : "查询",
                            icon : "fa fa-search",
                            callback : function(event) {
                                searchObj.run();
                            }
                        }
                    ],
                    data : {
                        type : "URL",
                        value : getServer()
                        + "/flea/hclv/fleets/selectAll.htmls"
                        // + "/flea/hclv/serviceOrg/queryAllServiceOrgPage.htmls"
                    }
                });
			}
			return {
				init : init
			}
		});